Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more permissive when checking schemas are identical. #18

Merged
merged 2 commits into from
Feb 10, 2021

Conversation

paddycarver
Copy link
Contributor

Allow schemas to differ in the order of attributes if they are otherwise
identical. Applies to the checks on provider schemas and provider_meta
schemas to ensure the servers are in agreement.

Fixes #16.

Allow schemas to differ in the order of attributes if they are otherwise
identical. Applies to the checks on provider schemas and provider_meta
schemas to ensure the servers are in agreement.
@paddycarver paddycarver added the enhancement New feature or request label Jan 4, 2021
@paddycarver paddycarver requested a review from a team January 4, 2021 15:48
Copy link
Member

@kmoe kmoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for this in schema_server_test.go?

Make sure that schemas are compared semantically, by not caring about
the order of blocks or attributes in the results for Provider and
ProviderMeta.

Add tests to verify that this is the case.

When Provider or ProviderMeta schemas don't match, include the diff in
the error for easier debugging.
@paddycarver paddycarver requested a review from kmoe February 2, 2021 12:34
@paddycarver
Copy link
Contributor Author

Should have tests now @kmoe

@paddycarver paddycarver merged commit 4b0c54e into main Feb 10, 2021
@bflad bflad deleted the paddy_more_lenient_schema_checks branch July 7, 2023 15:52
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider schema attributes ordering causes errors
2 participants